package com.pkk.cloud.support.admin.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.pkk.cloud.support.admin.dto.req.roles.OauthRoleDelReqDto;
import com.pkk.cloud.support.admin.dto.req.roles.OauthRoleIdReqDto;
import com.pkk.cloud.support.admin.dto.req.roles.OauthRolePageQueryReqDto;
import com.pkk.cloud.support.admin.dto.resp.roles.OauthSysRoleAllRespDto;
import com.pkk.cloud.support.admin.dto.resp.roles.OauthSysRolePageRespDto;
import com.pkk.cloud.support.admin.entity.resource.PenguinSysRole;
import com.pkk.components.rpc.page.Page;
import java.util.List;

public interface PenguinSysRoleService extends IService<PenguinSysRole> {


  /**
   * @Description: 根据用户id获取角色列表
   * @Param: parseLong
   * @return: java.util.List<java.lang.String>
   * @Author: peikunkun
   * @Date: 2020/3/18 下午8:53
   */
  List<String> findUserRoleByUserId(long parseLong);

  /**
   * @Description: 保存角色信息
   * @Param: role
   * @return: boolean
   * @Author: peikunkun
   * @Date: 2020/4/2 0002 下午 2:26
   */
  boolean saveSysRole(PenguinSysRole role);

  /**
   * @Description: 删除角色依据id
   * @Param: id
   * @return: boolean
   * @Author: peikunkun
   * @Date: 2020/4/2 0002 下午 2:29
   */
  boolean delSysRoleById(OauthRoleDelReqDto oauthRoleDelReqDto, String userId);

  /**
   * @Description: 更新角色依据id
   * @Param: role
   * @return: boolean
   * @Author: peikunkun
   * @Date: 2020/4/2 0002 下午 2:31
   */
  boolean updateSysRoleById(PenguinSysRole role);


  /**
   * @Description: 获取所有角色列表
   * @return: java.util.List<com.pkk.cloud.support.admin.dto.resp.roles.OauthSysRoleAllRespDto>
   * @Author: peikunkun
   * @Date: 2020/4/2 0002 下午 2:37
   */
  List<OauthSysRoleAllRespDto> findSysRoleList();

  /**
   * @Description: 分页查询角色信息
   * @Param: page
   * @Param body
   * @Author: peikunkun
   * @Date: 2020/4/2 0002 下午 2:43
   */
  PageInfo<OauthSysRolePageRespDto> findSysRoleListPage(Page page, OauthRolePageQueryReqDto body);

  /**
   * @Description: 获取角色信息依据主键
   * @Param: request
   * @return: com.pkk.components.rpc.response.CommonResponse<com.pkk.cloud.support.admin.dto.resp.roles.OauthSysRolePageRespDto>
   * @Author: peikunkun
   * @Date: 2020/4/8 0008 下午 5:50
   */
  OauthSysRolePageRespDto findOauthRoleById(OauthRoleIdReqDto body);

}
